package com.gy.boot.HuTool;

import cn.hutool.core.lang.Validator;
import cn.hutool.core.util.IdcardUtil;
import org.junit.Test;

public class ValidatorTool {

    @Test
    public void testID() {
//        System.out.println(Validator.isCitizenId("140201198001010177"));
        System.out.println(Validator.isCitizenId("150102880730303"));
        System.out.println(Validator.isCitizenId("410482199107104412"));
        System.out.println(Validator.isCitizenId("530300198504230769"));
        System.out.println(Validator.isCitizenId("412725199202128612"));
        System.out.println("======================");
        System.out.println(IdcardUtil.isValidCard("410482199107104412"));
        System.out.println(IdcardUtil.isValidCard("530300198504230769"));
        System.out.println(IdcardUtil.isValidCard("412725199202128612"));
    }

    @Test
    public void testID2() {
//        String ID_15 = "110102880730303";
        String ID_18 = "410482199107104412";
//        System.out.println(ID_18.substring(0, 6));
//        System.out.println(IdcardUtil.isValidCard(ID_15));
        System.out.println(IdcardUtil.isValidCard(ID_18));
//
//        int age = IdcardUtil.getAgeByIdCard(ID_18);
//        System.out.println(age);
//
//        String birth = IdcardUtil.getBirthByIdCard(ID_18);
//        System.out.println(birth);

//        System.out.println(IdcardUtil.getProvinceByIdCard(ID_18));
//        System.out.println(IdcardUtil.getProvinceByIdCard(ID_15));
//        System.out.println(IdCardCityUtil.getCityByID(ID_18));
//
//        System.out.println(IdCardCityUtil.getCityByID(ID_15));

    }

    @Test
    public void testPhone() {
        String phone = "18281916257";
        System.out.println(Validator.isMobile(phone));
    }



}
